package com.example.springcloud.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;

/**
 * 通用图片存储对象 images
 * 
 * @author hx
 * @date 2025-02-14
 */
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "通用图片存储对象")
@Data
public class Images implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 图片ID */
    @ApiModelProperty(value = "图片ID")
    private Long imageId;

    /** 关联类型（商品/订单/种草） */
    @Excel(name = "关联类型", readConverterExp = "商=品/订单/种草")
    @ApiModelProperty(value = "关联类型（0:商品/1:订单/2:种草）")
    private Integer entityType;

    /** 关联实体ID */
    @Excel(name = "关联实体ID")
    @ApiModelProperty(value = "关联实体ID")
    private Long entityId;

    /** 图片地址 */
    @Excel(name = "图片地址")
    @ApiModelProperty(value = "图片地址")
    private String imageUrl;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("imageId", getImageId())
            .append("entityType", getEntityType())
            .append("entityId", getEntityId())
            .append("imageUrl", getImageUrl())
            .toString();
    }
}
